package com.sentrix.auto.printercenter.infrastructure.agentserver.dto;

public enum CallMethodType {
    /**
     * 查询打印服务Mac地址，以便建立连接
     */
    Query_Agent_Mac("agent.queryAgentMac", "query Agent mac address"),
    PRINTERS_GET_DEFAULT("printers.getDefault", "access connected printers"),
    PRINTERS_FIND("printers.find", "access connected printers"),
    PRINTERS_DETAIL("printers.detail", "access connected printers"),
    PRINTERS_START_LISTENING("printers.startListening", "listen for printer status"),
    PRINTERS_CLEAR_QUEUE("printers.clearQueue", "cancel all pending jobs for a given printer"),
    PRINTERS_GET_STATUS("printers.getStatus", "query printer status"),
    PRINTERS_STOP_LISTENING("printers.stopListening", "stoping listen printer"),
    PRINT("print", "print to %s"),

    SERIAL_FIND_PORTS("serial.findPorts", "access serial ports"),
    SERIAL_OPEN_PORT("serial.openPort", "open a serial port"),
    SERIAL_SEND_DATA("serial.sendData", "send data over a serial port"),
    SERIAL_CLOSE_PORT("serial.closePort", "close a serial port"),

    SOCKET_OPEN_PORT("socket.open", "open a socket"),
    SOCKET_SEND_DATA("socket.sendData", "send data over a socket"),
    SOCKET_CLOSE_PORT("socket.close", "close a socket"),

    USB_LIST_DEVICES("usb.listDevices", "access USB devices"),
    USB_LIST_INTERFACES("usb.listInterfaces", "access USB devices"),
    USB_LIST_ENDPOINTS("usb.listEndpoints", "access USB devices"),
    USB_CLAIM_DEVICE("usb.claimDevice", "claim a USB device"),
    USB_CLAIMED("usb.isClaimed", "check USB claim status"),
    USB_SEND_DATA("usb.sendData", "use a USB device"),
    USB_READ_DATA("usb.readData", "use a USB device"),
    USB_OPEN_STREAM("usb.openStream", "use a USB device"),
    USB_CLOSE_STREAM("usb.closeStream", "use a USB device"),
    USB_RELEASE_DEVICE("usb.releaseDevice", "release a USB device"),

    HID_LIST_DEVICES("hid.listDevices", "access USB devices"),
    HID_START_LISTENING("hid.startListening", "listen for USB devices"),
    HID_STOP_LISTENING("hid.stopListening", "hid devices stop listening"),
    HID_CLAIM_DEVICE("hid.claimDevice", "claim a USB device"),
    HID_CLAIMED("hid.isClaimed", "check USB claim status"),
    HID_SEND_DATA("hid.sendData", "use a USB device"),
    HID_READ_DATA("hid.readData", "use a USB device"),
    HID_SEND_FEATURE_REPORT("hid.sendFeatureReport", "use a USB device"),
    HID_GET_FEATURE_REPORT("hid.getFeatureReport", "use a USB device"),
    HID_OPEN_STREAM("hid.openStream", "use a USB device"),
    HID_CLOSE_STREAM("hid.closeStream", "use a USB device"),
    HID_RELEASE_DEVICE("hid.releaseDevice", "release a USB device"),

    FILE_LIST("file.list", "view the filesystem"),
    FILE_START_LISTENING("file.startListening", "listen for filesystem events"),
    FILE_STOP_LISTENING("file.stopListening", ""),
    FILE_READ("file.read", "read the content of a file"),
    FILE_WRITE("file.write", "write to a file"),
    FILE_REMOVE("file.remove", "delete a file"),

    NETWORKING_DEVICE("networking.device", ""),
    NETWORKING_DEVICES("networking.devices", ""),
    NETWORKING_HOSTNAME("networking.hostname", ""),
    NETWORKING_DEVICE_LEGACY("websocket.getNetworkInfo", ""),
    GET_VERSION("getVersion", "get qztay version"),

    WEBSOCKET_STOP("websocket.stop", "stop websocket"),

    INVALID("", "");

    private final String methodName;
    private final String description;

    private CallMethodType(String methodName, String description) {
        this.methodName = methodName;
        this.description = description;
    }

    public String methodName() {
        return methodName;
    }

    public static void main(String[] args) {
        System.out.println(CallMethodType.GET_VERSION.methodName);
    }
}
